//=============================================================================//
//  ___  ___   _   _   _    __   _   ___ ___ __ __
// |_ _|| __| / \ | \_/ |  / _| / \ | o \ o \\ V /
//  | | | _| | o || \_/ | ( |_n| o ||   /   / \ / 
//  |_| |___||_n_||_| |_|  \__/|_n_||_|\\_|\\ |_|  2006
//										 
//=============================================================================//

#include "ILuaInterface.h"

typedef struct lua_State lua_State;
typedef int (*lua_CFunction) (lua_State *L);

extern ILuaInterface* g_Lua;

// You should place this at the top of your module
#define GMOD_MODULE( _startfunction_ ) \
	ILuaInterface* g_Lua = NULL; \
	int _startfunction_( void );\
	extern "C" int __declspec(dllexport) gmod_open( ILuaInterface* i ) \
	{ \
		g_Lua = i;\
		return _startfunction_();\
	}


#define LUA_FUNCTION( _function_ ) static int _function_( lua_State* )